﻿using System.Data.Entity;

namespace IOA.MES.Log.DataAccess.Entity
{
    public partial class MESLogContext : DbContext
    {
        private readonly string nameOrConnectionString;

        public MESLogContext(string nameOrConnectionString)
            : base("name=" + nameOrConnectionString)
        {
            this.nameOrConnectionString = nameOrConnectionString;
            this.Configuration.UseDatabaseNullSemantics = true;
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            Database.SetInitializer<MESLogContext>(null);
            base.OnModelCreating(modelBuilder);
        }
    }
}
